package com.kgar.dto;

import lombok.Data;

import java.util.List;
import java.util.Objects;

@Data
public class Node {
    private String id;
    private String name;
    private Integer level;
    private Integer childrenNum;
    private Boolean isLeaf;
    private String tag;
    private List<String> tags;
    private List<String> info;
    private String link;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Node node = (Node) o;
        return Objects.equals(id, node.id) && Objects.equals(name, node.name) && Objects.equals(tag, node.tag) && Objects.equals(info, node.info);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, tag, info);
    }
}
